import { createApp } from 'vue';
import App from './App.vue';
import components from './components/global';
import Router from './router/index';
import { createPinia } from 'pinia'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './styles/index.less';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
const pinia = createPinia()
// components
for (const i in components) {
  app.component(i, components[i])
}
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(ElementPlus)
app.use(pinia)
app.use(Router).mount('#app')
